package com.itheima.controller;

import com.github.pagehelper.PageInfo;
import com.itheima.pojo.BrandLog;
import com.itheima.service.BrandLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/brandLog")
public class BrandLogController {
    @Autowired
    private BrandLogService brandLogService;
    /**
     * 处理分查询
     * @param currentPage 当前页码
     * @param pageSize    每页条数
     * @return
     */
    @RequestMapping("/selectByPage")
    public PageInfo<BrandLog> selectByPage(Integer currentPage,
                                           Integer pageSize) {
        //调用brandLogService的selectByPage方法，分页查询,返回分页结果
        return brandLogService.selectByPage(currentPage, pageSize);
    }
}
